From b8f853a135cc4f1c974260c8fecb567652334e8c Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Mon, 20 Jan 2025 17:10:09 +0100 Subject: [PATCH] add an assert to ensure we do not use virtual file types with no VFS if VFS mode is off, we should nto be using any virtual file types Signed-off-by: Matthieu Gallien --- src/libsync/discovery.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index e2305a81e..3b9785a62 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -1712,6 +1712,16 @@ void ProcessDirectoryJob::processFileFinalize( } else { recurse = false; } + + if (!(item->isDirectory() || + (!_discoveryData->_syncOptions._vfs || _discoveryData->_syncOptions._vfs->mode() != OCC::Vfs::Off) || + item->_type != CSyncEnums::ItemTypeVirtualFile || + item->_type != CSyncEnums::ItemTypeVirtualFileDownload || + item->_type != CSyncEnums::ItemTypeVirtualFileDehydration)) { + qCCritical(lcDisco()) << "wong item type for" << item->_file << item->_type; + Q_ASSERT(false); + } + if (recurse) { auto job = new ProcessDirectoryJob(path, item, recurseQueryLocal, recurseQueryServer, _lastSyncTimestamp, this); -- 2.30.2